package com.kira.scaffoldmvc.Trace;

import com.kira.scaffoldmvc.POJO.Result;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.*;

@RestController
@RequestMapping("/trace")
@Slf4j
public class TestTraceController {

    @Resource
    ThreadPoolExecutor kiraExecutor1;


    @GetMapping("/test")
    Result test(){
        log.info("测试MDC1");
        kiraExecutor1.execute(()->{
            log.info("测试MDC2");
        });
        return Result.success(true );
    }


}
